package com.yuandian.api.management.feign;

import com.yuandian.api.management.entity.ConfAlarmIndicators;
import com.yuandian.bpm.common.core.util.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;
import java.util.Map;

/**
 * 说明：远程调用选项接口服务
 * @Author zfsn
 * @Date 2023/3/14 16:06
 */
@FeignClient(contextId = "RemoteAlarmIndicatorsService", value = "bpm-management")
public interface RemoteAlarmIndicatorsService {
	/**
	 * 通过主键更新自定义告警指标数据
	 * @return 通用返回对象
	 * @Description type = 1, 告警类型为基础告警
	 */
	@GetMapping("/alarmIndicators/getBaseAlarmIndicatorsAndCode")
	R<List<Map<String, Integer>>> getBaseAlarmIndicatorsAndCode();

	/**
	 * 通过主键查询数据
	 * @param id 主键集合
	 * @return 通用返回对象
	 */
	@GetMapping("/alarmIndicators/{id}")
	R<ConfAlarmIndicators> queryById(@PathVariable("id") Integer id);

	/**
	 * 通用查询对象
	 * @return 通用返回对象
	 * @Description type = 1, 告警类型为基础告警
	 */
	@ApiOperation(value = "通用查询对象", notes = "通用查询对象")
	@PostMapping("/alarmIndicators/list")
	R<List<ConfAlarmIndicators>> list(ConfAlarmIndicators confAlarmIndicators);
}
